source("replication_main.R")

# Appendix B --------------------------------------------------------------

df %>%
 group_by(source) %>%
 select(income, ideology, gender.f, fb, spanish, education,
        bilingual, age, pk_scale, latam_connections, media_usage,
        pre_belief, mexican, cuban, pr) %>%
 summarize_all(mean, na.rm = T) %>%
 t()

# Appendix F --------------------------------------------------------------
# full model specification
ates <- lm_robust(belief ~ condition + pre_belief + 
                    pre_fcont + pre_vaccine + interpersonal_trust + 
                    media_trust + social_trust + trial + spanish + 
                    pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source, data = df,
                  clusters = id)

# regression w/o controls and FEs
ate_basic <- lm_robust(belief ~ condition, data = df,
                       clusters = id)

# comparison
texreg(list(ate_basic, ates), stars = c(.05, .001), 
       include.ci = F, custom.coef.map = list("(Intercept)" = "Intercept", 
                                              "conditionMisinformation" = "Misinformation", 
                                              "conditionMisinformation + Fact Check" = "Misinformation + Fact Check"))

# correction effects (table)
cleaned.table %>% filter(term == "Correction Effect")
# misinformation effects (table)
cleaned.table %>% filter(term == "Misinformation Effect")
# CATE table
subgroup.df

# Appendix G --------------------------------------------------------------
texreg(lm_lin(belief ~ condition,~ pre_belief + 
               pre_fcont + pre_vaccine + interpersonal_trust + 
               media_trust + social_trust + spanish + 
               pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source, 
              data = df %>% filter(trial == "1"),
              clusters = id), 
       custom.coef.map = list("(Intercept)" = "Intercept", 
                              "conditionMisinformation" = "Misinformation", 
                              "conditionMisinformation + Fact Check" = 
                               "Misinformation + Fact Check"),
       include.ci = F)

# Appendix H ----------------------------------------------------------------

# CATEs by political claims
texreg(list(lm_robust(belief ~ fc.v.misinfo*political,
                      data = df,
                      clusters = id)), include.ci = FALSE,
)

# Appendix I -------------------------------------------------------
lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$pre_belief, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> prior.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$pre_belief, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> prior.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$interpersonal_trust, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> ip.trust.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$interpersonal_trust, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> ip.trust.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$social_trust, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> social.trust.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$social_trust, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> social.trust.high


lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$sl_trust, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> sl.trust.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$sl_trust, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> sl.trust.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$twitter_usage, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> twitter.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$twitter_usage, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> twitter.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$insta_usage, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> insta.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$insta_usage, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> insta.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$youtube_usage, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> youtube.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$youtube_usage, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> youtube.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$facebook_usage, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> fb.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$facebook_usage, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> fb.high


lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$ideology, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> ideology.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$ideology, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> ideology.high

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$bilingual == 1 & df$spanish == 0,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> treat.lang.eng

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$bilingual == 1 & df$spanish == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> treat.lang.spa

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$mexican == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> mexican

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$cuban == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> cuban

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$pr == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> puertorican

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$whatsapp_trust, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> whatsapp.trust.low

lm_robust(belief ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$whatsapp_trust, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> whatsapp.trust.high

prior.low %>%
 extract2(., "contrasts") %>%
 as.data.frame() %>%
 bind_cols(subgroup = "Low Accuracy", group = "prior beliefs (ordinal)", meta = "predispositions") %>%
 bind_rows(prior.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% bind_cols(subgroup = "High Accuracy", group = "prior beliefs (ordinal)",  meta = "predispositions")) %>%
 bind_rows(ip.trust.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "interpersonal\ntrust",  meta = "information environment")) %>%
 bind_rows(ip.trust.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "interpersonal\ntrust",  meta = "information environment")) %>%
 bind_rows(social.trust.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "social media\ntrust",  meta = "information environment")) %>%
 bind_rows(social.trust.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "social media\ntrust",  meta = "information environment")) %>%
 bind_rows(sl.trust.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "ethnic media\ntrust",
                      meta = "information environment")) %>%
 bind_rows(sl.trust.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "ethnic media\ntrust",  meta = "information environment")) %>%
 bind_rows(twitter.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "twitter\nusage",
                      meta = "information environment")) %>%
 bind_rows(twitter.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "twitter\nusage",
                      meta = "information environment")) %>%
 bind_rows(insta.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "instagram\nusage",
                      meta = "information environment")) %>%
 bind_rows(insta.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "instagram\nusage",
                      meta = "information environment")) %>%
 bind_rows(fb.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "facebook\nusage",
                      meta = "information environment")) %>%
 bind_rows(fb.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "facebook\nusage",
                      meta = "information environment")) %>%
 bind_rows(youtube.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "youtube\nusage",
                      meta = "information environment")) %>%
 bind_rows(youtube.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "youtube\nusage",
                      meta = "information environment")) %>%
 bind_rows(treat.lang.eng %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "English", group = "treatment language (bilinguals)",
                      meta = "acculturation")) %>%
 bind_rows(treat.lang.spa %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Spanish", group = "treatment language (bilinguals)",
                      meta = "acculturation")) %>%
 bind_rows(cuban %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Cuban", group = "national origin",
                      meta = "predispositions")) %>%
 bind_rows(mexican %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Mexican", group = "national origin",
                      meta = "predispositions")) %>%
 bind_rows(puertorican %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Puerto Rican", group = "national origin",
                      meta = "predispositions")) %>%
 mutate(contrast = plyr::mapvalues(contrast,
                                   c("Misinformation - Control",
                                     "(Misinformation + Fact Check) - Misinformation"),
                                   c("Misinformation Effect", "Correction Effect"))) %>%
 mutate(contrast = forcats::fct_rev(contrast)) -> subgroup.df; condition <- 0

subgroup.df %>%
 filter(meta == "acculturation") %>%
 ggplot(aes(x = condition, 
            y = estimate, 
            label = round(estimate, 1),
            group = subgroup,
            shape = contrast)) +
 geom_hline(yintercept = 0, linetype = "dashed", alpha = .5) +
 geom_linerange(aes(ymin = estimate - 1.96*SE, 
                    ymax = estimate + 1.96*SE), alpha = .5,
                position = position_dodge(.5),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(position = position_dodge(.5), size = 5) +
 geom_text(aes(x = condition+.075, 
               y = estimate,
               label = subgroup), size = 5, col = "black",
           position = position_dodge(.5)) +
 labs(y = "Effect Estimate (Ordinal)", x = "", shape = "") +
 theme(plot.title = element_text(hjust = 0.5),
       legend.position = "bottom") +
 facet_grid(meta ~ group) +
 theme(axis.text.y = element_blank(),
       panel.grid.minor = element_blank(),
       strip.text.x = element_text(size = 18),
       strip.text.y = element_text(size = 18),
       legend.text=element_text(size=0),
       axis.title.x = element_blank(),
       legend.position = "none") +
 theme(plot.margin = unit(c(.05,.05,.05,.05), "cm")) +
 ylim(c(-.5, .5)) +
 coord_flip() -> g1

subgroup.df %>%
 filter(meta == "information environment") %>%
 ggplot(aes(x = condition, 
            y = estimate, 
            label = round(estimate, 1),
            group = subgroup,
            shape = contrast)) +
 geom_hline(yintercept = 0, linetype = "dashed", alpha = .5) +
 geom_linerange(aes(ymin = estimate - 1.96*SE, 
                    ymax = estimate + 1.96*SE),
                position = position_dodge(.5),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(position = position_dodge(.5), size = 5) +
 geom_text(aes(x = condition+.075, 
               y = estimate,
               label = subgroup), size = 5, col = "black",
           position = position_dodge(.5)) +
 labs(y = "Estimate (Ordinal)", x = "", shape = "") +
 theme(plot.title = element_text(hjust = 0.5),
       legend.position = "bottom") +
 facet_grid(meta ~ group) +
 theme(axis.text.y = element_blank(),
       panel.grid.minor = element_blank(),
       strip.text.x = element_text(size = 18),
       strip.text.y = element_text(size = 18),
       legend.text=element_text(size=0),
       axis.title.x = element_blank(),
       legend.position = "none") +
 theme(plot.margin = unit(c(.05,.05,.05,.05), "cm")) +
 ylim(c(-.4, .4)) +
 coord_flip() -> g2

subgroup.df %>%
 filter(meta == "predispositions") %>%
 ggplot(aes(x = condition, 
            y = estimate, 
            label = round(estimate, 1),
            group = subgroup,
            shape = contrast)) +
 geom_hline(yintercept = 0, linetype = "dashed", alpha = .5) +
 geom_linerange(aes(ymin = estimate - 1.96*SE, 
                    ymax = estimate + 1.96*SE),
                position = position_dodge(.5),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(position = position_dodge(.5), size = 5) +
 geom_text(aes(x = condition+.075, 
               y = estimate,
               label = subgroup), size = 5, col = "black",
           position = position_dodge(.5)) +
 labs(y = "Estimate (Ordinal)", x = "", shape = "") +
 theme(plot.title = element_text(hjust = 0.5),
       legend.position = "bottom") +
 facet_grid(meta ~ group) +
 theme(axis.text.y = element_blank(),
       panel.grid.minor = element_blank(),
       axis.text.x = element_text(size = 15),
       strip.text.x = element_text(size = 18),
       strip.text.y = element_text(size = 18),
       legend.text=element_text(size=18),
       legend.position = "bottom") +
 ylim(c(-.5, .5)) +
 theme(plot.margin = unit(c(.05,.05,.05,.05), "cm")) +
 theme(legend.margin=margin(-10, 0, 0, 0)) +
 coord_flip() -> g3

g <- grid.arrange(g1, g2, g3)
g

# Appendix J ----------------------------------------------------------

clean_df_misinfo <- df %>% 
 dplyr::select(c("id", "misinfo.v.control", 
                 "pre_belief", "belief", "fcont", "pre_vaccine", "ideology",
                 "media_trust", "social_trust", "interpersonal_trust",
                 "whatsapp_usage", "whatsapp_trust", "pk_scale", "fb", 
                 "latam_connections", "age", "gender.f", "income", "sl_usage", "twitter_usage",
                 "facebook_usage", "insta_usage", "youtube_usage",
                 "whatsapp_groups", "spanish", "pre_graham",
                 "pre_ft1", "pre_ft2", "pre_ft3", "pre_ft4",
                 "pre_fcont", "claim1", "claim2", "claim3", "claim4",
                 "claim5", "claim6", "claim7", "claim8")) %>% na.omit()

clean_df_fc <- df %>% 
 dplyr::select(c("id", "fc.v.control", "pre_belief", "belief", "fcont", "pre_vaccine", "ideology",
                 "media_trust", "social_trust", "interpersonal_trust",
                 "whatsapp_usage", "whatsapp_trust", "pk_scale", "fb", 
                 "latam_connections", "age", "gender.f", "income", "sl_usage", "twitter_usage",
                 "facebook_usage", "insta_usage", "youtube_usage",
                 "whatsapp_groups", "spanish", "pre_graham",
                 "pre_ft1", "pre_ft2", "pre_ft3", "pre_ft4",
                 "pre_fcont", "claim1", "claim2", "claim3", "claim4",
                 "claim5", "claim6", "claim7", "claim8")) %>% na.omit()

fit_misinfo <- causal_forest(clean_df_misinfo[,c("pre_belief", "pre_vaccine", "ideology",
                                                      "media_trust", "social_trust", "interpersonal_trust",
                                                      "whatsapp_usage", "whatsapp_trust", "pk_scale", "fb", 
                                                      "latam_connections", "age", "gender.f", "income", "sl_usage", "twitter_usage",
                                                      "facebook_usage", "insta_usage", "youtube_usage",
                                                      "whatsapp_groups", "spanish", "pre_graham",
                                                      "pre_ft1", "pre_ft2", "pre_ft3", "pre_ft4",
                                                      "pre_fcont", "claim1", "claim2", "claim3", "claim4",
                                                      "claim5", "claim6", "claim7", "claim8")],
                                  clean_df_misinfo$belief,
                                  clean_df_misinfo$misinfo.v.control,
                                  clusters = clean_df_misinfo$id,
                                  num.trees = 8000)

fit_fc <- causal_forest(clean_df_fc[,c("pre_belief", "pre_vaccine", "ideology",
                                            "media_trust", "social_trust", "interpersonal_trust",
                                            "whatsapp_usage", "whatsapp_trust", "pk_scale", "fb", 
                                            "latam_connections", "age", "gender.f", "income", "sl_usage", "twitter_usage",
                                            "facebook_usage", "insta_usage", "youtube_usage",
                                            "whatsapp_groups", "spanish", "pre_graham",
                                            "pre_ft1", "pre_ft2", "pre_ft3", "pre_ft4",
                                            "pre_fcont", "claim1", "claim2", "claim3", "claim4",
                                            "claim5", "claim6", "claim7", "claim8")],
                             clean_df_fc$belief,
                             clean_df_fc$fc.v.control,
                             clusters = clean_df_fc$id,
                             num.trees = 8000)

misinfo_tes <- tibble(id = fit_misinfo$clusters, 
                      fit_misinfo$X.orig,
                      te = as.numeric(unlist(fit_misinfo$predictions)),
                      condition = "misinfo")

fc_tes <- tibble(id = fit_fc$clusters,
                 fit_fc$X.orig,
                 te = as.numeric(unlist(fit_fc$predictions)),
                 condition = "fact-check")

tibble(var = c("pre_belief", "pre_vaccine", "ideology",
               "media_trust", "social_trust", "interpersonal_trust",
               "whatsapp_usage", "whatsapp_trust", "pk_scale", "fb", 
               "latam_connections", "age", "gender.f", "income", "sl_usage", "twitter_usage",
               "facebook_usage", "insta_usage", "youtube_usage",
               "whatsapp_groups", "spanish", "pre_graham",
               "pre_ft1", "pre_ft2", "pre_ft3", "pre_ft4",
               "pre_fcont", "claim1", "claim2", "claim3", "claim4",
               "claim5", "claim6", "claim7", "claim8"), fc_imp = as.vector(variable_importance(fit_fc)), mi_imp = as.vector(variable_importance(fit_misinfo))) %>% arrange(desc(fc_imp)) %>%
 filter(!grepl('claim', var))%>% xtable() %>% 
 print(., include.rownames = FALSE)

# Appendix K --------------------------------------------------------------

stdize <-function(x) {
  return((x - mean(x, na.rm = T))/sd(x, na.rm = T))
}

lapply(1:8, 
       function(x) broom::tidy(lm_lin(lapply(c("biden_atts", "biden_ft","trump_ft", "democrats_ft", "republicans_ft",
                                               "elec_confidence", "trump_won", "vote"), 
                                             function(x) as.formula(paste("I(stdize(", x, "))", "~ fc.v.misinfo", sep = "")))[[x]],
                                      covariates = ~ pre_belief + pre_fcont + pre_vaccine +  interpersonal_trust + media_trust + social_trust + trial + spanish + source + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4,
                                      data = df,
                                      clusters = id))) %>%
 bind_rows() %>%
 bind_rows(
  lapply(1:8, 
         function(x) broom::tidy(lm_lin(lapply(
          c("biden_atts", "biden_ft","trump_ft", "democrats_ft", "republicans_ft", "elec_confidence", "trump_won", "vote"), 
          function(x) as.formula(paste("I(stdize(", x, "))", 
                                       "~ misinfo.v.control", sep = "")))[[x]],
          covariates = ~ pre_belief + pre_fcont + pre_vaccine +  interpersonal_trust + media_trust + social_trust + trial + spanish + source + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4, data = df, clusters = id))) %>%
   bind_rows()      
 ) -> results.df

results.df %>%
 bind_rows(broom::tidy(lm_lin(I(stdize(vax_attitudes)) ~ 
                               misinfo.v.control, 
                              covariates = ~ pre_belief + pre_fcont + pre_vaccine +  interpersonal_trust + media_trust + social_trust + spanish + source + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4,
                              data = df,
                              clusters = id))) %>%
 bind_rows(broom::tidy(lm_lin(I(stdize(vax_attitudes)) ~ 
                               fc.v.misinfo, 
                              covariates = ~ pre_belief + pre_fcont + pre_vaccine +  interpersonal_trust + media_trust + social_trust + spanish + source + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4,
                              data = df,
                              clusters = id))) %>%
 mutate(term = plyr::mapvalues(
  term,
  c("fc.v.misinfo", "misinfo.v.control"),
  c("Correction Effect", "Misinformation Effect")
 ),
 outcome = gsub("[()]","",outcome)) %>%
 mutate(outcome = gsub("Istdize", "", outcome)) %>%
 mutate(
  outcome = plyr::mapvalues(outcome,
                            from = c("biden_atts", "biden_ft","trump_ft",
                                     "democrats_ft", "republicans_ft",
                                     "elec_confidence", "trump_won", "vote", "vax_attitudes"),
                            to = c("Biden Extremity",
                                   "Biden Affect",
                                   "Trump Affect",
                                   "Democrats Affect",
                                   "Republicans Affect",
                                   "Trust in US Elections",
                                   "Trump Won Election",
                                   "Turnout Intention",
                                   "Vaccine Attitudes")
  )) %>%
 filter(outcome != "Trump Won Election") %>%
 filter(term == "Correction Effect" | term == "Misinformation Effect") %>%
 mutate(term = forcats::fct_rev(term)) %>%
 ggplot(aes(x = forcats::fct_reorder(outcome, 
                                     estimate),
            y = estimate,
            shape = term)) +
 geom_pointrange(aes(ymin = conf.low, ymax = conf.high),
                 position = position_dodge(.5), size = 1) +
 facet_wrap(. ~ term, 
            nrow = 2) +
 coord_flip() +
 theme_ipsum_rc() +
 geom_hline(yintercept = 0) +
 theme(legend.position = "") +
 labs(x = "", y = "effect estimate (std. deviations)") 

# Appendix L --------------------------------------------------------------

# CATEs by source
texreg(lm_robust(belief ~ condition*source,
                 data = df,
                 clusters = id), include.ci = FALSE)

# Appendix M --------------------------------------------------------------

# Foreign aid experiment
texreg(lm_robust(foreign.aid ~ foreign*source,
                 df, clusters = id), include.ci = F)

# Linked fate experiment
texreg(lm_robust(lfate ~ spanish*source, df, 
                 subset = bilingual == 1,
                 clusters = id),  include.ci = F)

# Appendix O ---------------------------------------------------------

ates <- lm_robust(fcont ~ condition + pre_belief + 
                   pre_fcont + pre_vaccine + interpersonal_trust + 
                   media_trust + social_trust + trial + spanish + 
                   pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source, data = df,
                  clusters = id)

ates %>%
 emmeans(specs = consec ~ condition) %>%
 extract2(., "emmeans") %>%
 as.data.frame() %>%
 ggplot(aes(x = forcats::fct_reorder(condition,
                                     c(3,2,1)), y = emmean, 
            label = round(emmean, 1))) +
 geom_linerange(aes(ymin = lower.CL, ymax = upper.CL),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(size = 6) +
 #geom_point(size = 13, col = "black") +
 #geom_point(size = 12.5, col = "white") +
 #geom_text(size = 6, col = "black") +
 labs(y = "Belief Accuracy (Continuous)", x = "") +
 theme(plot.title = element_text(hjust = 0.5)) +
 coord_flip() -> ate.1

ate.1 + theme(axis.title.x = element_text(size = 20), 
              axis.text.y = element_text(size = 20),
              axis.text.x = element_text(size = 18))


df %>%
 group_by(claim) %>%
 do(mod = broom::tidy(lm_lin(fcont ~ fc.v.misinfo,
                             covariates = ~ pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
                             data = .,
                             clusters = id)),
    mod2 = broom::tidy(lm_lin(fcont ~ misinfo.v.control,
                              covariates = ~ pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
                              data = .,
                              clusters = id))) -> results

results %>% unnest(cols = c(mod)) %>% 
 filter(term == "fc.v.misinfo") %>% 
 bind_rows(results %>% 
            unnest(cols = c(mod2)) %>% 
            filter(term == "misinfo.v.control")) %>%
 mutate(term = plyr::mapvalues(
  term,
  c("fc.v.misinfo", "misinfo.v.control"),
  c("Correction Effect", "Misinformation Effect")
 )) -> cleaned.table

cleaned.table %>%
 ggplot(aes(x = forcats::fct_reorder(claim,
                                     estimate), y = estimate)) +
 geom_point(size = 5) +
 geom_linerange(aes(ymin = conf.low, ymax = conf.high), size = 2) +
 facet_wrap(. ~ forcats::fct_rev(term), nrow = 1) +
 coord_flip() +
 theme_ipsum_rc() +
 geom_hline(yintercept = 0) +
 labs(x = "", y = "Estimate (Continuous)") +
 theme(axis.title.x = element_text(size = 20),
       axis.text.x = element_text(size = 15),
       strip.text.x = element_text(size = 15),
       axis.text.y = element_text(size = 15)) +
 theme(plot.margin = unit(c(1,1,.05,.05), "cm"))

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = spanish == 1 & bilingual == 0,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> spanish.ate

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = spanish == 0 & bilingual == 0,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> english.ate

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = bilingual == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> bilingual.ate

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = fb == 0,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> native.born

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = fb == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> foreign.born

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$media_trust, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> media.trust.low

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$media_trust, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> media.trust.high

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$whatsapp_groups == 0,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> whatsapp.low

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$whatsapp_groups == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> whatsapp.high

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$sl_usage, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> sl.low

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$sl_usage, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> sl.high

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$latam_connections, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> latam.low

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$latam_connections, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> latam.high

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$pk_scale, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> pk.low

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$pk_scale, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> pk.high

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$pre_fcont, 3) == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> prior.low

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = ntile(df$pre_fcont, 3) == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> prior.high

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$pid == 1,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> dem

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$pid == 2,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> rep

lm_robust(fcont ~ condition + pre_belief + pre_fcont + pre_vaccine + interpersonal_trust + media_trust + social_trust + trial + spanish + pre_ft1 + pre_ft2 + pre_ft3 + pre_ft4 + source,
          data = df,
          subset = df$pid == 3,
          clusters = id) %>%
 emmeans(specs = consec ~ condition) -> ind

spanish.ate %>%
 extract2(., "contrasts") %>%
 as.data.frame() %>%
 bind_cols(subgroup = "Spanish", group = "language preference", meta = "acculturation") %>%
 bind_rows(english.ate %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% bind_cols(subgroup = "English", group = "language preference",  meta = "acculturation")) %>%
 bind_rows(bilingual.ate %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Either", group = "language preference",  meta = "acculturation")) %>%
 bind_rows(native.born %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Native Born", group = "nativity",  meta = "acculturation")) %>%
 bind_rows(foreign.born %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Foreign Born", group = "nativity",  meta = "acculturation")) %>%
 bind_rows(media.trust.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "trust in media",  meta = "information environment")) %>%
 bind_rows(media.trust.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "trust in media",
                      meta = "information environment")) %>%
 bind_rows(whatsapp.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "No", group = "whatsapp groups",  meta = "information environment")) %>%
 bind_rows(whatsapp.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Yes", group = "whatsapp groups",
                      meta = "information environment")) %>%
 bind_rows(sl.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "spanish-language media",
                      meta = "information environment")) %>%
 bind_rows(sl.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "spanish-language media",
                      meta = "information environment")) %>%
 bind_rows(latam.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "latam connections",
                      meta = "acculturation")) %>%
 bind_rows(latam.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "latam connections",
                      meta = "acculturation")) %>%
 bind_rows(pk.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low", group = "political knowledge",
                      meta = "predispositions")) %>%
 bind_rows(pk.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High", group = "political knowledge",
                      meta = "predispositions")) %>%
 bind_rows(dem %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Democrat", group = "partisanship",
                      meta = "predispositions")) %>%
 bind_rows(rep %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Republican", group = "partisanship",
                      meta = "predispositions")) %>%
 bind_rows(ind %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Independent", group = "partisanship",
                      meta = "predispositions")) %>%
 bind_rows(dem %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Democrat", group = "partisanship",
                      meta = "predispositions")) %>%
 bind_rows(prior.low %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "Low Accuracy", group = "prior beliefs",
                      meta = "predispositions")) %>%
 bind_rows(prior.high %>% 
            extract2(., "contrasts") %>%
            as.data.frame() %>% 
            bind_cols(subgroup = "High Accuracy", group = "prior beliefs",
                      meta = "predispositions")) %>%
 mutate(contrast = plyr::mapvalues(contrast,
                                   c("Misinformation - Control",
                                     "(Misinformation + Fact Check) - Misinformation"),
                                   c("Misinformation Effect", "Correction Effect"))) %>%
 mutate(contrast = forcats::fct_rev(contrast)) -> subgroup.df

subgroup.df %>%
 filter(meta == "acculturation") %>%
 ggplot(aes(x = condition, 
            y = estimate, 
            label = round(estimate, 1),
            group = subgroup,
            shape = contrast)) +
 geom_hline(yintercept = 0, linetype = "dashed", alpha = .5) +
 geom_linerange(aes(ymin = estimate - 1.96*SE, 
                    ymax = estimate + 1.96*SE),
                position = position_dodge(.5),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(position = position_dodge(.5), size = 5) +
 geom_text(aes(x = condition+.075, 
               y = estimate,
               label = subgroup), size = 5, col = "black",
           position = position_dodge(.5)) +
 labs(y = "Effect Estimate (Ordinal)", x = "", shape = "") +
 theme(plot.title = element_text(hjust = 0.5),
       legend.position = "bottom") +
 facet_grid(meta ~ group) +
 theme(axis.text.y = element_blank(),
       panel.grid.minor = element_blank(),
       axis.text.x = element_text(size = 0),
       strip.text.x = element_text(size = 18),
       strip.text.y = element_text(size = 18),
       legend.text=element_text(size=0),
       axis.title.x = element_blank(),
       legend.position = "none") +
 theme(plot.margin = unit(c(.05,.05,.05,.05), "cm")) +
 ylim(c(-35, 35)) +
 coord_flip() -> g1

subgroup.df %>%
 filter(meta == "information environment") %>%
 ggplot(aes(x = condition, 
            y = estimate, 
            label = round(estimate, 1),
            group = subgroup,
            shape = contrast)) +
 geom_hline(yintercept = 0, linetype = "dashed", alpha = .5) +
 geom_linerange(aes(ymin = estimate - 1.96*SE, 
                    ymax = estimate + 1.96*SE),
                position = position_dodge(.5),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(position = position_dodge(.5), size = 5) +
 geom_text(aes(x = condition+.075, 
               y = estimate,
               label = subgroup), size = 5, col = "black",
           position = position_dodge(.5)) +
 labs(y = "Estimate (Ordinal)", x = "", shape = "") +
 theme(plot.title = element_text(hjust = 0.5),
       legend.position = "bottom") +
 facet_grid(meta ~ group) +
 theme(axis.text.y = element_blank(),
       panel.grid.minor = element_blank(),
       axis.text.x = element_text(size = 0),
       strip.text.x = element_text(size = 18),
       strip.text.y = element_text(size = 18),
       legend.text=element_text(size=0),
       axis.title.x = element_blank(),
       legend.position = "none") +
 theme(plot.margin = unit(c(.05,.05,.05,.05), "cm")) +
 ylim(c(-35, 35)) +
 coord_flip() -> g2

subgroup.df %>%
 filter(meta == "predispositions") %>%
 ggplot(aes(x = condition, 
            y = estimate, 
            label = round(estimate, 1),
            group = subgroup,
            shape = contrast)) +
 geom_hline(yintercept = 0, linetype = "dashed", alpha = .5) +
 geom_linerange(aes(ymin = estimate - 1.96*SE, 
                    ymax = estimate + 1.96*SE),
                position = position_dodge(.5),
                size = 2) +
 theme_ipsum_rc() +
 geom_point(position = position_dodge(.5), size = 5) +
 geom_text(aes(x = condition+.075, 
               y = estimate,
               label = subgroup), size = 5, col = "black",
           position = position_dodge(.5)) +
 labs(y = "Estimate (Ordinal)", x = "", shape = "") +
 theme(plot.title = element_text(hjust = 0.5),
       legend.position = "bottom") +
 facet_grid(meta ~ group) +
 theme(axis.text.y = element_blank(),
       panel.grid.minor = element_blank(),
       axis.text.x = element_text(size = 15),
       strip.text.x = element_text(size = 18),
       strip.text.y = element_text(size = 18),
       legend.text=element_text(size=18),
       legend.position = "bottom") +
 ylim(c(-35, 35)) +
 theme(plot.margin = unit(c(.05,.05,.05,.05), "cm")) +
 theme(legend.margin=margin(-10, 0, 0, 0)) +
 coord_flip() -> g3

g <- grid.arrange(g1, g2, g3)
g

# Appendix R --------------------------------

texreg(lm(belief ~ fc.v.misinfo*trial, df),
       include.ci = F)

texreg(lm(belief ~ misinfo.v.control*trial, df),
       include.ci = F)


